
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>源码理解 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Code-management.html" />
    
    
    <link rel="prev" href="Performance-optimization.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    关于
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Part I</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="Data-structure.html">
            
                <a href="Data-structure.html">
            
                    
                    数据结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="Arithmetic.html">
            
                <a href="Arithmetic.html">
            
                    
                    算法
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Part II</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="Foundation.html">
            
                <a href="Foundation.html">
            
                    
                    Foundation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="UIKit.html">
            
                <a href="UIKit.html">
            
                    
                    UIKit
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="WebView.html">
            
                <a href="WebView.html">
            
                    
                    WebView
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="Memory-management.html">
            
                <a href="Memory-management.html">
            
                    
                    内存管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="Message-passing.html">
            
                <a href="Message-passing.html">
            
                    
                    消息传递的方式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="Network.html">
            
                <a href="Network.html">
            
                    
                    网络
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="Data-storage.html">
            
                <a href="Data-storage.html">
            
                    
                    数据存储
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="Multi-thread.html">
            
                <a href="Multi-thread.html">
            
                    
                    多线程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="Animation.html">
            
                <a href="Animation.html">
            
                    
                    动画
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="Image-processing.html">
            
                <a href="Image-processing.html">
            
                    
                    图像处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.11" data-path="Data-encryption.html">
            
                <a href="Data-encryption.html">
            
                    
                    数据安全及加密
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.12" data-path="Runtime.html">
            
                <a href="Runtime.html">
            
                    
                    Runtime
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.13" data-path="Runloop.html">
            
                <a href="Runloop.html">
            
                    
                    Runloop
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Part III</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="Project-organization.html">
            
                <a href="Project-organization.html">
            
                    
                    项目架构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="Design-patterns.html">
            
                <a href="Design-patterns.html">
            
                    
                    设计模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="Component-based.html">
            
                <a href="Component-based.html">
            
                    
                    组件化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="Debug-tips.html">
            
                <a href="Debug-tips.html">
            
                    
                    调试技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="Performance-optimization.html">
            
                <a href="Performance-optimization.html">
            
                    
                    性能优化
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="4.6" data-path="Source-code.html">
            
                <a href="Source-code.html">
            
                    
                    源码理解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="Code-management.html">
            
                <a href="Code-management.html">
            
                    
                    代码管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.8" data-path="Continuous-integration.html">
            
                <a href="Continuous-integration.html">
            
                    
                    持续集成
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >源码理解</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x6E90;&#x7801;&#x7406;&#x89E3;">&#x6E90;&#x7801;&#x7406;&#x89E3;</h1>
<h2 id="1yykit">1.YYKit</h2>
<p>YYKit &#x662F;&#x4E00;&#x7EC4;&#x5E9E;&#x5927;&#x3001;&#x529F;&#x80FD;&#x4E30;&#x5BCC;&#x7684; iOS &#x7EC4;&#x4EF6;&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x9700;&#x8981;&#x4ECE;&#x7EC4;&#x4EF6;&#x67B6;&#x6784;&#xFF0C;&#x6E90;&#x7801;&#xFF0C;&#x8BBE;&#x8BA1;&#x601D;&#x8DEF;&#xFF0C;&#x89E3;&#x51B3;&#x95EE;&#x9898;&#x7684;&#x65B9;&#x6848;&#x7B56;&#x7565;&#x7B49;&#x591A;&#x65B9;&#x9762;&#x53BB;&#x5B66;&#x4E60;&#x3002;</p>
<h2 id="2sdwebimage&#x52A0;&#x8F7D;&#x56FE;&#x7247;&#x8FC7;&#x7A0B;">2.SDWebImage&#x52A0;&#x8F7D;&#x56FE;&#x7247;&#x8FC7;&#x7A0B;</h2>
<ul>
<li><p>0&#x3001;&#x9996;&#x5148;&#x663E;&#x793A;&#x5360;&#x4F4D;&#x56FE;</p>
</li>
<li><p>1&#x3001;&#x5728;webimagecache&#x4E2D;&#x5BFB;&#x627E;&#x56FE;&#x7247;&#x5BF9;&#x5E94;&#x7684;&#x7F13;&#x5B58;&#xFF0C;&#x5B83;&#x662F;&#x4EE5;url&#x4E3A;&#x6570;&#x636E;&#x7D22;&#x5F15;&#x5148;&#x5728;&#x5185;&#x5B58;&#x4E2D;&#x67E5;&#x627E;&#x662F;&#x5426;&#x6709;&#x7F13;&#x5B58;&#xFF1B;</p>
</li>
<li><p>2&#x3001;&#x5982;&#x679C;&#x6CA1;&#x6709;&#x7F13;&#x5B58;&#xFF0C;&#x5C31;&#x901A;&#x8FC7;md5&#x5904;&#x7406;&#x8FC7;&#x7684;key&#x6765;&#x5728;&#x78C1;&#x76D8;&#x4E2D;&#x67E5;&#x627E;&#x5BF9;&#x5E94;&#x7684;&#x6570;&#x636E;&#xFF0C;&#x5982;&#x679C;&#x627E;&#x5230;&#x5C31;&#x4F1A;&#x628A;&#x78C1;&#x76D8;&#x4E2D;&#x7684;&#x6570;&#x636E;&#x52A0;&#x5230;&#x5185;&#x5B58;&#x4E2D;&#xFF0C;&#x5E76;&#x663E;&#x793A;&#x51FA;&#x6765;&#xFF1B;</p>
</li>
<li><p>3&#x3001;&#x5982;&#x679C;&#x5185;&#x5B58;&#x548C;&#x78C1;&#x76D8;&#x4E2D;&#x90FD;&#x6CA1;&#x6709;&#x627E;&#x5230;&#xFF0C;&#x5C31;&#x4F1A;&#x5411;&#x8FDC;&#x7A0B;&#x670D;&#x52A1;&#x5668;&#x53D1;&#x9001;&#x8BF7;&#x6C42;&#xFF0C;&#x5F00;&#x59CB;&#x4E0B;&#x8F7D;&#x56FE;&#x7247;&#xFF1B;</p>
</li>
<li><p>4&#x3001;&#x4E0B;&#x8F7D;&#x5B8C;&#x7684;&#x56FE;&#x7247;&#x52A0;&#x5165;&#x7F13;&#x5B58;&#x4E2D;&#xFF0C;&#x5E76;&#x5199;&#x5165;&#x5230;&#x78C1;&#x76D8;&#x4E2D;&#xFF1B;</p>
</li>
<li><p>5&#x3001;&#x6574;&#x4E2A;&#x83B7;&#x53D6;&#x56FE;&#x7247;&#x7684;&#x8FC7;&#x7A0B;&#x662F;&#x5728;&#x5B50;&#x7EBF;&#x7A0B;&#x4E2D;&#x8FDB;&#x884C;&#xFF0C;&#x5728;&#x4E3B;&#x7EBF;&#x7A0B;&#x4E2D;&#x663E;&#x793A;&#x3002;</p>
</li>
</ul>
<h2 id="3yywebimage&#x548C;sdwebimage&#x5BF9;&#x6BD4;">3.YYWebImage&#x548C;SDWebImage&#x5BF9;&#x6BD4;</h2>
<p>&#x3002;&#x3002;&#x3002;</p>
<h2 id="4afnetworking-&#x5E95;&#x5C42;&#x539F;&#x7406;&#x5206;&#x6790;">4.AFNetworking &#x5E95;&#x5C42;&#x539F;&#x7406;&#x5206;&#x6790;</h2>
<p>AFNetworking&#x662F;&#x5C01;&#x88C5;&#x7684;NSURLSession&#x7684;&#x7F51;&#x7EDC;&#x8BF7;&#x6C42;&#xFF0C;&#x7531;&#x4E94;&#x4E2A;&#x6A21;&#x5757;&#x7EC4;&#x6210;&#xFF1A;&#x5206;&#x522B;&#x7531;NSURLSession,Security,Reachability,Serialization,UIKit&#x4E94;&#x90E8;&#x5206;&#x7EC4;&#x6210;</p>
<ul>
<li><p>NSURLSession&#xFF1A;&#x7F51;&#x7EDC;&#x901A;&#x4FE1;&#x6A21;&#x5757;&#xFF08;&#x6838;&#x5FC3;&#x6A21;&#x5757;&#xFF09; &#x5BF9;&#x5E94; AFNetworking&#x4E2D;&#x7684; AFURLSessionManager&#x548C;&#x5BF9;HTTP&#x534F;&#x8BAE;&#x8FDB;&#x884C;&#x7279;&#x5316;&#x5904;&#x7406;&#x7684;AFHTTPSessionManager,AFHTTPSessionManager&#x662F;&#x7EE7;&#x627F;&#x4E8E;AFURLSessionmanager&#x7684;</p>
</li>
<li><p>Security&#xFF1A;&#x7F51;&#x7EDC;&#x901A;&#x8BAF;&#x5B89;&#x5168;&#x7B56;&#x7565;&#x6A21;&#x5757;  &#x5BF9;&#x5E94; AFSecurityPolicy</p>
</li>
<li><p>Reachability&#xFF1A;&#x7F51;&#x7EDC;&#x72B6;&#x6001;&#x76D1;&#x542C;&#x6A21;&#x5757; &#x5BF9;&#x5E94;AFNetworkReachabilityManager</p>
</li>
<li><p>Seriaalization&#xFF1A;&#x7F51;&#x7EDC;&#x901A;&#x4FE1;&#x4FE1;&#x606F;&#x5E8F;&#x5217;&#x5316;&#x3001;&#x53CD;&#x5E8F;&#x5217;&#x5316;&#x6A21;&#x5757; &#x5BF9;&#x5E94; AFURLResponseSerialization</p>
</li>
<li><p>UIKit&#xFF1A;&#x5BF9;&#x4E8E;iOS UIKit&#x7684;&#x6269;&#x5C55;&#x5E93;</p>
</li>
</ul>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="Performance-optimization.html" class="navigation navigation-prev " aria-label="Previous page: 性能优化">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Code-management.html" class="navigation navigation-next " aria-label="Next page: 代码管理">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"源码理解","level":"4.6","depth":1,"next":{"title":"代码管理","level":"4.7","depth":1,"path":"Code-management.md","ref":"Code-management.md","articles":[]},"previous":{"title":"性能优化","level":"4.5","depth":1,"path":"Performance-optimization.md","ref":"Performance-optimization.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"Source-code.md","mtime":"2020-04-13T10:23:32.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-05-27T09:12:21.691Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

